<template>
  <div class="article-box" @click="infoClick">
    <div class="article-box-item">
      <div class="article-box-item-left">
        <img src="../assets/images/info3.jpg" alt="" />
      </div>
      <div class="article-box-item-right">
        Vue.js
      </div>
    </div>

    <div class="article-box-item">
      <div class="article-box-item-right">
        THML+CSS
      </div>
      <div class="article-box-item-left">
        <img src="../assets/images/bg.jpg" alt="" />
      </div>
    </div>

    <div class="article-box-item">
      <div class="article-box-item-left">
        <img src="../assets/images/info1.jpg" alt="" />
      </div>
      <div class="article-box-item-right">
        node.js
      </div>
    </div>

    <div class="article-box-item">
      <div class="article-box-item-right">
        前端面试经历
      </div>
      <div class="article-box-item-left">
        <img src="../assets/images/info2.jpg" alt="" />
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "wenzhang",
  methods: {
    infoClick() {
      this.$message.warning("文章页面开发中,请期待！");
    },
  },
};
</script>

<style lang="less" scoped>
.article-box {
  width: 75%;
  margin: 0 auto;
  padding-top: 20px;
  &-item {
    width: 100%;
    height: 300px;
    background-color: #fff;
    border-radius: 12px 8px 8px 12px;
    box-shadow: 0 3px 8px 6px rgba(7, 17, 27, 0.06);
    margin-top: 30px;
    transition: all 0.3s;
    border-radius: 12px 8px 8px 12px;
    overflow: hidden;
    cursor: pointer;
    &:nth-child(1) {
      margin: 0;
    }
    .flex();
    &-left {
      width: 45%;
      height: 100%;
      overflow: hidden;

      img {
        width: 100%;
        height: 100%;
        transition: all 0.6s;
      }
    }
    &-right {
      flex: 1;
      flex-shrink: 0;
      font-weight: 600;
      color: #000000;
      font-size: 24px;
      text-align: center;
    }
    &:hover {
      box-shadow: 0 3px 8px 6px rgba(7, 17, 27, 0.15);
      img {
        width: 102%;
        height: 102%;
      }
    }
  }
}
</style>
